package com.atguigu.spring.ioc.dao;

import com.atguigu.spring.ioc.datasource.TDataSource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class DeliveryDao {
    // 问题1:数据源组件有三个
    // 1. 告诉Spring, 哪个数据源哪种情况下才生效 可以用@Profile在数据源组件配置时标注
    @Autowired
    TDataSource dataSource;

    public void saveDelivery() {
        System.out.println("数据源,保存数据"+dataSource);
    }

}
